import { NgModule } from "@angular/core";
import { Routes, RouterModule } from "@angular/router";

/**
 * ps: 路由为空，默认指向当前路由 /workplace or /dashboard/workplace 的区别
 */
const routes: Routes = [
	{ path: "", redirectTo: "/workplace", pathMatch: "full" },

	{
		path: "welcome",
		loadChildren: () => import("./welcome/welcome.module").then((m) => m.WelcomeModule)
	},
	{
		path: "workplace",
		loadChildren: () => import("./workplace/workplace.module").then((m) => m.WorkplaceModule)
	}
];

@NgModule({
	imports: [RouterModule.forChild(routes)],
	exports: [RouterModule]
})
export class DashboardRoutingModule {}
